package com.sdx.console.content.service;

import java.util.List;

import org.beetl.sql.core.engine.PageQuery;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.ibeetl.admin.core.util.PlatformException;

import com.sdx.console.content.dao.EbookUpdateRecordDao;
import com.sdx.console.content.entity.EbookUpdateRecord;
import com.ibeetl.admin.core.service.BaseService;

/**
 * EbookUpdateRecord Service
 */

@Service
@Transactional
public class EbookUpdateRecordService extends BaseService<EbookUpdateRecord>{

    @Resource
	private EbookUpdateRecordDao ebookUpdateRecordDao;

    public PageQuery<EbookUpdateRecord>queryByCondition(PageQuery query){
        PageQuery ret =  ebookUpdateRecordDao.queryByCondition(query);
        queryListAfter(ret.getList());
        return ret;
    }

    public void batchDelEbookUpdateRecord(List<String> ids){
        try {
            ebookUpdateRecordDao.batchDelEbookUpdateRecordByIds(ids);
        } catch (Exception e) {
            throw new PlatformException("批量删除EbookUpdateRecord失败", e);
        }
    }

	public List<EbookUpdateRecord> all() {
		return ebookUpdateRecordDao.all();
		}
}